package com.yoyo.itravel.dao;

import com.yoyo.itravel.bean.FlightOrder;
import com.yoyo.itravel.constants.BaseSqlProviderConstant;
import com.yoyo.itravel.sql_provider.BaseSqlProvider;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

/**
*@Description:机票订单相关操作接口
*@param:
*@Author:CRR
*@Date：16:20 2020/6/18
*/
@Repository
public interface IFlightOrderDao {

    /**
     * 增加机票订单
     * @return
     * @throws SQLException
     */
   @InsertProvider(type = BaseSqlProvider.class, method = BaseSqlProviderConstant.INSERT)
    int insert(FlightOrder flightorder)throws SQLException;
    /**
     * 删除机票订单
     * @return
     * @throws SQLException
     */
    @DeleteProvider(type = BaseSqlProvider.class, method = BaseSqlProviderConstant.DELETE_BY_ID)
    int delete(FlightOrder flightorder) throws SQLException;
    /**
     * 查询机票订单
     * @return
     * @throws SQLException
     */
    @SelectProvider(type = BaseSqlProvider.class, method = BaseSqlProviderConstant.SELETE)
    FlightOrder selectByFlightOrderId(String orderId) throws SQLException;
    /**
     * 修改机票订单
     * @return
     * @throws SQLException
     */
    @UpdateProvider(type = BaseSqlProvider.class, method = BaseSqlProviderConstant.UPDATE_BY_ID)
    int update(FlightOrder flightorder) throws SQLException;
}